package com.onlineshop.highgee.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.onlineshop.highgee.dao.ShopCarDao;
import com.onlineshop.highgee.daoimpl.ShopCarDaoImpl;

/**
 * Servlet implementation class ShopCleanAll
 */
/**
*椤圭洰鍚嶇О:HighGee
* 绫� 鍚� 绉�:CleanShopCarServlet
* 绫� 鎻� 杩�:
* 鍒� 寤� 浜�:souk
*鍒涘缓鏃堕棿:2019骞�12鏈�24鏃ヤ笂鍗�10:03:27
*@version
 */
@WebServlet("/RemoveShopAll")
public class CleanShopCarServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
   
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	  doPost(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		ShopCarDao shopCarDao=new ShopCarDaoImpl();
		shopCarDao.removeAllCar();
		request.getRequestDispatcher("cart.jsp").forward(request, response);//杞彂鍒皉equest.jsp
	}

}
